#include <stdio.h>
#include <signal.h>
#include <unistd.h>
void func(int sig)
{
  printf("get a signal:%d\n",sig);
}
int main()
{
  signal(2,func);
  while(1)
  {
    printf("hello world\n");
    sleep(1);
  }
}
